<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<title>点击获取后端数据</title>
	<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
	<input type="button" value="获取信息"/>
	<div id="info"></div>
	<script>
		$('input').click(function(){
			$.ajax({
				url:"<?php echo U('demo');?>",
				type:'get',
				success:function(data){
					$('#info').html(data);
				}
			});
		});
	</script>
</body>
</html>